<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/11/30
 * Time: 14:45
 * 投诉管理
 */
require_once 'common.php';
$action = $_GET['action'];

if($action == ''){

}elseif ($action == 'ajaxpages'){
    $ob = new report_class();
    $pages = $_POST['pages'] ? $_POST['pages'] : 1;
    $pagesize = 20;
    $offset = ($pages - 1) * $pagesize;
    $cons = "seller_userid=" . $_SESSION['user_id'];
    $arr=$ob->fetch_all('reportresult', $pagesize,$offset,"seller_userid='" . $_SESSION['user_id'] . "'", 'order by id asc');
    if($arr){
        foreach ($arr as $k=>$v){
            $row['id'] = $v['id'];
            $row['report_orderid'] = makeSafe($v['report_orderid']);
            $row['report_type'] = makeSafe($v['report_type']);
            $row['maijia_contact'] = makeSafe($v['maijia_contact']);
            $row['report_creattime'] = makeSafe($v['report_creattime']);
            $row['report_status'] = intval($v['report_status']);
            $row['maijia_remark'] = htmlspecialchars($v['maijia_remark']);
            $row['result_remark'] = htmlspecialchars($v['result_remark']);
            $row['result_status'] = intval($v['result_status']);
            $row['refund_status'] = intval($v['refund_status']);
            $row['refund_price'] = makeSafe($v['refund_price'],'float');
            $lists[] = $row;
        }
        $Err['code'] = 1;
        $Err['msg'] = $lists;
    }else{
        $Err['code'] = -1;
        $Err['msg'] = '暂无更多数据！';
    }
    echo json_encode($Err);
    exit();
}
